<?php
$intNtype				= $objRequest->getParam('nty',-1);
$objNlogs 				= new Nlogs();	
$objNews				= new News();
$arrNews				= null;
if($intNtype == -1 && isset($_COOKIE['DASHBOARD_NEWS_TAB'])) {
	$intNtype	= $_COOKIE['DASHBOARD_NEWS_TAB'];
}
if($intNtype == -1) {	
	$arrNews			= $objNews->getAllForDashboard(0);
	$intNtype			= 0;	
	if(!$arrNews) {
		$intNtype		= 1;
		$arrNews		= $objNews->getAllForDashboard(1);
	}
}elseif($intNtype==0 || $intNtype == 1) {
	$arrNews			= $objNews->getAllForDashboard($intNtype);
}else {
	$arrNews			= $objNlogs->getNlogsByUserId($AppUI->id,0,20);	
}
$this->view->intNtype	= $intNtype;
$this->view->arrNews	= $arrNews;
?>